<?php htmlTemplate('admin_header_frame.php');?>
<div class="title">用户列表
<a  href="<?php echo ZSM_WWW_HOST.'admin.php/admin/home/roleadduser/'?>" class="title_button">添加用户</a>
</div>
<table width="100%" cellspacing="1" cellpadding="3" id="listTable">
  <tbody><tr>
  	<th align="left">用户ID</a></th>  
    <th><a href="javascript:;" id="order_brand_id" onclick="orderBy('brand_id','DESC')">用户名</a></th>   
    <th align="center">电子邮件</th>    
    <th align="center">联系电话</th>
    <th align="center">用户类型</th>
    <th align="center">操作</th>
  </tr>

	<?php 
	foreach ($rs as $k=>$v):
	?>
   <tr>
    <td align="left"> <?php echo $v['uid'];?></td>
    <td align="center">
	<?php echo $v['username'];?>
	</td>    
    <td align="center">
   	<?php echo $v['email'];?>
   	</td>   
    <td align="center">
    <?php echo $v['tel'];?>
    </td>   
    <td align="center">
   <?php 
   if($v['isadmin']==1 ){echo '超管';}
   if($v['isadmin']==2 ){echo '管理员';}
   if($v['isadmin']==3 ){echo '普通用户';}
  
   ?>
    </td>   
    <td align="center"><?php if ($v['username']!='admin' ){?>     
      <a title="编辑" href="<?php echo ZSM_WWW_HOST.'admin.php/admin/home/modifyuser/id/'.$v['uid'];?>">编辑</a> |
      <?php  if($v['isadmin']!=1 ){?>
      <a title="设置权限" href="<?php echo ZSM_WWW_HOST.'admin.php/admin/home/roleset/id/'.$v['uid'];?>">设置权限</a> |
      <?php }?>
      <a title="移除" onclick="getUrl('<?php echo ZSM_WWW_HOST.'admin.php/admin/home/roledel/id/'.$v['uid'];?>',1,1)" href="javascript:;">移除</a><?php }?>
    </td>   
  </tr>
  <?php endforeach;?>
  
 
 
  </tbody>
</table>
<?php htmlTemplate('admin_footer_frame.php');?>
<script>
function  delItems()
{
	var items = getCheckItems();	
	if(!items){
		parent.showAlert('请选择要删除的用户！');
		return false;
	}
	var url = '<?php echo ZSM_WWW_HOST;?>admin.php/admin/product/typedel/id/'+items;
	getUrl(url,1,1);
}
</script>